﻿package scrn;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class Test07 extends JFrame implements ActionListener {

private static final long serialVersionUID = 1L;
public MPanel panel;
public static Test07 frame;

private void createAndShowGUI() {

	panel = new MPanel();
	
	panel.but01.addActionListener(this);
	
	this.add(panel);

	//Display the window.
	this.pack();
	this.setVisible(true);
}


public static void main(String[] args) {

	frame = new Test07();
	 
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	
	frame.createAndShowGUI();
}


@Override
public void actionPerformed(ActionEvent e) {
	
	int c =RandGen.getNum(30);
	this.panel.text01.setText("с = " +c);
}



}
